package itheima.d01;

import cn.hutool.core.util.NumberUtil;

import java.math.RoundingMode;

public class Test {
    public static void main(String[] args) {
        System.out.println("抽奖出货的概率为："+Math.random()+"%");

        System.out.println("最大值："+Math.max(1, 2));
        System.out.println("最小值："+Math.min(1, 2));

        System.out.println("充值金额："+Math.abs(-1));
        System.out.println("角度"+Math.sin(30));
        System.out.println("角度"+Math.cos(30));
        System.out.println("角度"+Math.tan(30));

        System.out.println("2的3次方："+Math.pow(2, 3));
        System.out.println("25的平方根："+Math.sqrt(25));
        System.out.println("25的立方根："+Math.cbrt(25));

        System.out.println("四舍五入："+Math.round(3.99));
        System.out.println("四舍五入："+Math.floor(3.51));
        System.out.println("四舍五入："+Math.ceil(3.51));

        System.out.println("===========================================================");


        System.out.println(NumberUtil.max(1, 2, 3, 4, 5));
        System.out.println(NumberUtil.max(1, 2, 3, 4, 5, 6, 7, 8, 9, 10));
        System.out.println(NumberUtil.div(1, 2));
        System.out.println(NumberUtil.div(2, 2, 3, RoundingMode.CEILING));



    }
}
